﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Employee_salary
{
    class Program
    {
        static void Main(string[] args)
        {
           Employee[] empl = new Employee[] {
           new Worker("Bill", 1200),
           new Worker("Edd", 2000),
            new HourlyWorker("Ben", 10, 160),
            new HourlyWorker("Jill", 15, 120),
           };

            for (int i = 0; i < empl.Length; i++)
            {
                empl[i].CalculateSalary();

            }

            //List <Employee> empl = new List<Employee>

            //{
            //new Worker("Bill", 1200),
            //new Worker("Edd", 2000),
            //new HourlyWorker("Ben", 10, 16),
            //new HourlyWorker("Jill", 15, 12),
            //};

            //foreach (var item in empl)
            //{
            //    item.CalculateSalary();
            //}




        }
    }
}
